<template>
  <div class="content">
    <div v-html="content"></div>
  </div>
</template>

<script>
  export default {
    name: "index",
    data(){
      return{
        content:""
      }
    },
    onShow(){
      this.gerAboutUs();
    },
    methods:{
      //获取关于我们
      async gerAboutUs(){
        const res = await this.$request.getData('/other/gerAboutUs');
        if (res.data.level == 'success'){
          let str = res.data.data.content;
          str = str.replace(/<img[^>]*>/gi, function (match, capture) {
            return match.replace(/style\s*?=\s*?([‘"])[\s\S]*?\1/ig, '')
          });
          str = str.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
          this.content = str;
        }
      }
    }
  }
</script>

<style scoped lang="scss">
  .content{
    padding: 30rpx;
  }
</style>
